Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Getting Information About Compressor Components


GetCodecNameList

The GetCodecNameList function allows your application to retrieve a list of installed compressor components or a list of installed compressor types. This information may be useful when the user selects a compression type for a given image or sequence.

pascal OSErr GetCodecNameList (CodecNameSpecListPtr *list,
                               short showAll);
list
Contains a pointer to a field that is to receive a pointer to the compressor name list structure. The Image Compression Manager creates the appropriate list and returns a pointer to that list in the field specified by the list parameter. Note that the GetCodecNameList function creates this list in your application's current heap zone.
showAll
Specifies a short integer that controls the contents of the list. Set this parameter to 1 to receive a list of the names of all installed compressor components--the returned list contains one entry for each installed compressor. Set this parameter to 0 to receive a list of the types of installed compressor components--the returned list contains one entry for each installed compressor type. See "The Compressor Name List Structure" on page 3-51 for a complete description of the contents of the returned list.
DESCRIPTION
The Image Compression Manager returns this information in a compressor name list structure, which contains an array of compressor name structures and a field indicating the number of structures in the array.

The CodecType data type defines a field in the compressor name list structure that identifies the compression method employed by a given compressor component. Apple Computer's Developer Technical Support group assigns these values so that they remain unique. These values correspond, in turn, to text strings that can identify the compression method to the user.

typedef long CodecType; 
/* compressor type descriptor--for example 'jpeg','rle ',
    'rpza' */
Currently, six CodecType values are provided by Apple. You should use the GetCodecNameList function to retrieve these names, so that your application can take advantage of new compressor types that may be added in the future. For each CodecType value in the following list, the corresponding compression method is also identified by its text string name. For more information about each of these compression techniques, see the section "About Image Compression," which begins on page 3-8.
Table 3-3 Compressor type descriptors
Compressor typeCompressor name
'rpza'video compressor
'jpeg'photo compressor
'rle 'animation compressor
'raw 'raw compressor
'smc 'graphics compressor
'cdvc'compact video compressor

SPECIAL CONSIDERATIONS
Note that the Image Compression Manager returns the list in your application's current heap zone. Use the DisposeCodecNameList function, described in the next section, to release this memory when your program is finished with the list.

RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
Component Manager errors
Memory Manager errors


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996